package Collection;

import java.util.Objects;

public class Song {
    private String songName;
    private String singer;

    public String getSongName() {
        return songName;
    }

    public void setSongName(String songName) {
        this.songName = songName;
    }

    public String getSinger() {
        return singer;
    }

    public void setSinger(String singer) {
        this.singer = singer;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Song song = (Song) o;
        return songName.equals(song.songName) &&
                singer.equals(song.singer);
    }

    @Override
    public int hashCode() {
        return Objects.hash(songName, singer);
    }

    public Song(String songName, String singer) {
        this.songName = songName;
        this.singer = singer;
    }

    @Override
    public String toString() {
        return "Song{" +
                "songName='" + songName + '\'' +
                ", singer='" + singer + '\'' +
                '}';
    }
}
